package com.wl.designpattern.visitor;

/**
 * Created by wangliang on 2021/2/27.
 */
public class Video extends Web {
    public Video(String name) {
        super(name);
    }

    @Override
    public void accept(Visitor visitor) {//接受访问者的访问
        visitor.visit(this);
    }

    @Override
    public void download() {//实现父类中的公共方法
        System.out.println("下载视频~~");
    }

    public void playVideo() {//视频类独有方法
        System.out.println("播放视频ing");
    }
}
